import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import { router } from './router'

import ElementPlus from 'element-plus'
// import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/src/index.scss'

import microApp from '@micro-zoe/micro-app'

import { jobType as jobTypeArr } from '@/assets/consts/dictData'

window.jobTypeArr = jobTypeArr

microApp.start({
    tagName: 'micro-app',
    "disable-memory-router": true,
    preFetchApps: [
        {
            name: 'childHome',
            url: 'http://localhost:3000/main/childHome',
            level: 3
        },
        {
            name: 'childJob',
            url: 'http://localhost:8080/',
            level: 3
        },
        {
            name: 'childEnterprise',
            url: 'http://localhost:3002/child/findEnterprise/',
            level: 3,
            iframe: true
        },
        {
            name: 'childAbout',
            url: 'http://localhost:3003/',
            level: 3
        },
    ]
})

microApp.router.setBaseAppRouter(router)

const app = createApp(App)

app.use(router)
app.use(ElementPlus)

app.mount('#app')
